<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="layout.xhtml">
        <ui:define name="body">
            <div class="section">
                <h1>Editar</h1>
                <h:form id="userForm" enctype="multipart/form-data">
                    <p:growl id="messages" showDetail="true" autoUpdate="true"  /> 
                    <div class="container_24 clearfix">
                        <h3 style="margin:0 0 10px 0">Dados Gerais</h3>
                        <p:outputLabel value="Nome : " styleClass="grid_3"/>
                        <p:inputText styleClass="grid_20" value="#{managerSearchUser.user.name}" />

                        <p:outputLabel value="Cargo : " styleClass="grid_3"/>
                        <p:inputText styleClass="grid_20" value="#{managerSearchUser.user.post}" />
                        <div class="clear" />
                        
                        <h3 style="margin:0 0 10px 0">Login</h3>
                        <p:outputLabel value="Login : " styleClass="grid_3 labelRequired" for="loginInputText"/>
                        <p:inputText id="loginInputText" styleClass="grid_8" required="true" 
                                     value="#{managerSearchUser.user.login}" />
                        <p:outputLabel value="Senha Atual : " styleClass="grid_3 labelRequired" 
                                       for="passwordOldPassword" style="width: 126px;"/>
                        <p:password id="passwordOldPassword" required="true" 
                                    styleClass="grid_8" value="#{managerSearchUser.passwordOld}" />

                        <div style="clear: both"/>
                        <p:outputLabel value="Nova Senha : " styleClass="grid_3 labelRequired" 
                                       style="width: 119px; margin-left: -14px" for="passwordNewPassword"/>
                        <p:password id="passwordNewPassword" styleClass="grid_8" 
                                    required="true" value="#{managerSearchUser.passwordNew}" />
                        <p:outputLabel value="Confirmar : " styleClass="grid_3 labelRequired" for="confirmPassword"
                                       style="width: 126px;"/>
                        <p:password id="confirmPassword" styleClass="grid_6" style="width: 31.2%" 
                                    required="true" value="#{managerSearchUser.confirm}" />

                        <br/>
                        <div class="clear" />
                        <div class="buttonAction">
                            <p:commandButton value="Salvar" icon="ui-icon-disk"
                                            update="@form"
                                            actionListener="#{managerSearchUser.update()}"
                                            styleClass="ui-priority-primary" />
                            <p:button href="searchuser.xhtml" value="Cancelar"  icon="ui-icon-trash" />
                        </div >
                    </div>
                </h:form>
            </div>
        </ui:define>
    </ui:composition>

</html>
